package com.wry.wry_test.algorithm;

/**
 * @Author: wangrongyi
 * @Date: 2024/11/20 13:34
 * @Description:
 */
public class Day12 {

    public static String solution(String inp) {
        // Edit your code here
        int len = inp.length();
        for (int i = 1; i < len; i++) {
            String regex = inp.substring(0, i);
            if (inp.split(regex).length == 0) return regex;
        }
        return "";
    }

    public static void main(String[] args) {
        // Add your test cases here


        System.out.println(solution("abcabcabcabc").equals("abc"));

    }


}
